package com.witmore.skyline.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 摄像头表
 * </p>
 *
 * @author 豆子高
 * @since 2025-02-24
 */
@Getter
@Setter
@TableName("skyline_camera")
public class CameraDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 摄像头id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("camera_id")
    private Integer cameraId;
    /**
     * 摄像头名称
     */
    @TableField("camera_name")
    private String cameraName;

    /**
     * 摄像头序列号
     */
    @TableField("camera_sn")
    private String cameraSn;

    /**
     * 企业id
     */
    @TableField("org_id")
    private Integer orgId;

    /**
     * 项目部id
     */
    @TableField("project_id")
    private Integer projectId;

    /**
     * 摄像头类型 0: 自带摄像头 1: 萤石摄像头 2: TpLink摄像头
     */
    @TableField("type")
    private Integer type;

    /**
     * 摄像头类型名称skyline_camera_type_id 表id
     */
    @TableField("model_id")
    private Integer modelId;

    /**
     * 摄像头类型名称skyline_camera_type_id 表name
     */
    @TableField("model_name")
    private String modelName;


    /**
     * 摄像头在线状态 0: 离线 1: 在线
     */
    @TableField("camera_status")
    private Integer cameraStatus;

    /**
     * 是否删除 0未删除 1已删除
     */
    @TableField("is_deleted")
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 设备id
     */
    @TableField("skyline_device_id")
    private Integer skylineDeviceId;

    /**
     * 设备序列号
     */
    @TableField("device_sn")
    private String deviceSn;
}
